﻿package mortal.game.view.interfaceCallModule
{
    import Engine.RMI.*;

    public class InterfaceCallCache extends Object
    {
        private var _record:String = "";
        private var _num:int = 1;

        public function InterfaceCallCache()
        {
            return;
        }// end function

        private function onShowInterfaceName(event:RMIEvent) : void
        {
            if (this._num > 300)
            {
                this._record = "";
                this._num = 1;
            }
            var _loc_2:* = new Date();
            var _loc_3:* = event.interfaceName.replace("[object", "").replace("]", "");
            if (_loc_3 == " AMI_IInter_testNet")
            {
                return;
            }
            this._record = this._record + (this._num + "  " + _loc_3 + "   " + _loc_2.hours + ":" + _loc_2.minutes + ":" + _loc_2.seconds + "<br>");
            var _loc_4:String = this;
            var _loc_5:* = this._num + 1;
            _loc_4._num = _loc_5;
            return;
        }// end function

        public function get record() : String
        {
            return this._record;
        }// end function

        public function addEvents() : void
        {
            RMIDispatcher.getInstance().addEventListener(RMIEvent.SHOW_INTERFACE_TYPE, this.onShowInterfaceName);
            return;
        }// end function

    }
}
